package org.example;

import java.io.*;
import java.util.HashMap;
import java.util.Map;

//2.6	增加部门信息(A06)
public class PostDemoA06 {

    public static void main(String[] args) {
        // 构建嵌套JSON结构
        Map<String, Object> data = new HashMap<>();
        data.put("id", "A06");
        data.put("DeptName", "测试部");
        data.put("ParentID", "0");
        data.put("DeptID", "zsdfd150");

        try {
// {"data":{"ParentID":"0","id":"A06","DeptName":"测试部","DeptID":"zsdfd150"},"openid":"000001","timestamp":"20250507151224"}
            String response = sendJsonPostRequest.sendJsonPostRequest(data);
            System.out.println("响应内容：\n" + response);
// {"errcode":"0","msg":"成功","data":[{"ErrCode":"0","ErrStr":"zsdfd150"}]}
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}



